var roleFormFieldsChanged=false;BX.ready(function(){BX.bind(BX("landing-mode-form-submit"),"click",function(){BX("landing-mode-form").submit()});var n=BX("landing-role-edit").querySelectorAll("select,input");n.forEach(function(n){BX(n).addEventListener("change",function(){roleFormFieldsChanged=true})});var e=BX.findChild(BX("landing-role-rights-table"),{class:"landing-rightsblock-remove"},true,true);e.forEach(function(n){BX(n).addEventListener("click",function(){var e=BX.data(BX(n),"id");if(e){var i=BX.findChild(BX("landing-role-rights-table"),{class:"landing-rightsblock-"+e},true,true);i.forEach(function(n){BX.remove(BX(n))})}}.bind(this))})});function showSiteMenu(n,e,i){var o=[];var t=BX.Landing.UI.Tool.ActionDialog.getInstance();for(var r in e){if(e[r].DELETED==="Y"){continue}o.push({text:BX.util.htmlspecialchars(e[r].TITLE),onclick:function(n){return function(){var o=function(){window.location.href=BX.util.add_url_param(window.location.href.split("#")[0]+"#site"+e[n].ID,{site:e[n].ID})};if(roleFormFieldsChanged){var r=t.show({content:i.LANDING_ALERT_CONTENT_RELOADED,type:"confirm"});r.then(function(){o()},function(){})}else{o()}}}(r)})}var a=new BX.PopupMenuWindow("landing-role-popup",BX("landing-role-add"),o,{autoHide:true,angle:true,className:"landing-role-popup",offsetTop:0,offsetLeft:0});a.show()}
//# sourceMappingURL=script.map.js